Method and an apparatus for processing a video signal

ABSTRACT

The present invention includes determining a motion vector candidate set of a current block, obtaining motion vector indication information of a current block from a video signal, extracting a motion vector candidate corresponding to a motion vector indication information from a motion vector candidate set, determining a predicted motion vector of a current block based on the extracted motion vector candidate, and performing motion compensation on a current block based on a predicted motion vector.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.12/738,239, filed Apr. 15, 2010, now allowed, which is a U.S. NationalPhase of International Patent Application No. PCT/KR2008/006113, filedon Oct. 16, 2008, which claims the benefit of U.S. ProvisionalApplication Nos. 60/980,432, 60/980,434, and 60/980,435 filed on Oct.16, 2007, Provisional Application No. 61/016,808, filed on Dec. 27,2007, Provisional Application No. 61/029,577, filed on Feb. 19, 2008,Provisional Application No. 61/031,705, filed on Feb. 27, 2008 andProvisional Application No. 61/075,759, filed on Jun. 26, 2008 theentire contents of which are hereby incorporated by reference in theirentireties.

TECHNICAL FIELD

The present invention relates to a method and apparatus for processing avideo signal, and more particularly, to a video signal processing methodand apparatus for encoding or decoding video signals.

BACKGROUND ART

Generally, compression coding means a series of signal processingtechniques for transferring digitalized information via a communicationcircuit or storing digitalized information in a format suitable for astorage medium. Targets of compression coding include audio, video,character, etc. In particular, a technique of performing compressioncoding on video is called video compression. Video sequence is generallycharacterized in having spatial redundancy and temporal redundancy.

DISCLOSURE OF THE INVENTION Technical Problem

However, if the spatial redundancy and the temporal redundancy are notsufficiently eliminated, a compression rate in coding a video signal islowered. If the spatial redundancy and the temporal redundancy areexcessively eliminated, it is unable to generate information requiredfor decoding a video signal to degrade a reconstruction ratio.

Technical Solution

Accordingly, the present invention is directed to an apparatus forprocessing a video signal and method thereof that substantially obviateone or more of the problems due to limitations and disadvantages of therelated art.

An object of the present invention is to provide an apparatus forprocessing a video signal and method thereof, by which compressionefficiency can be raised by means of using all nine kinds of intraprediction modes non-limited to blocks located in a boundary area of apicture.

Another object of the present invention is to provide an apparatus forprocessing a video signal and method thereof, by which accuracy ofmotion vector prediction can be enhanced using various motion vectorpredictor candidates.

Advantageous Effects

Accordingly, the present invention provides the following effects and/oradvantages.

First of all, a video signal processing method according to the presentinvention can enhance coding efficiency by means of using all nine kindsof intra prediction modes non-limited to blocks located in a boundaryarea of a picture.

Secondly, a video signal processing method according to the presentinvention can enhance accuracy of prediction and coding efficiency in amanner that a current block uses adjacent pixels within the currentblock for intra prediction as well as pixels of a neighbor block.

Thirdly, a video signal processing method according to the presentinvention can reduce a bitrate using an intra-skip mode.

Fourthly, a video signal processing method according to the presentinvention enables a current frame to be accurately predicted using aseparate intra prediction mode in a manner that a predicted block is notlimited to the block located at a top or left of a current block.

Fifthly, a video signal processing method according to the presentinvention adopts a predictor similar to a motion vector of a currentblock using various motion vector predictor candidates, thereby enablingaccurate motion prediction.

Sixthly, a video signal processing method according to the presentinvention determines a motion vector predictor candidate according tohomogeneity between current and previous blocks and a type of thecurrent block, thereby enhancing accuracy of motion prediction of thecurrent block.

Seventhly, a video signal processing method according to the presentinvention determines a motion vector predictor by considering a distancebetween a frame indicated by a reference index of a current block and aframe indicated by a reference index of a neighbor block, therebyenhancing accuracy of prediction in a manner that the determined motionvector predictor has a value more similar to that of a motion vector ofthe current block.

Eighthly, a video signal processing method according to the presentinvention can raise coding efficiency by further activating a skip modeusing a partially skip mode and can also raise a reconstruction ratio ofa current block using motion vectors more than those of a related artskip mode.

Ninthly, a video signal processing method according to the presentinvention uses at least two motion vectors within 16*16 block by way ofusing 8*8 spatial direct mode, thereby having a higher reconstructionratio in case that a current block is located on a boundary area or asmall object is moving.

Tenthly, a video signal processing method according to the presentinvention rearranges residual signals so that a block having a smallresidual value is located at left or top in a row or column prior todiscrete cosine transform, thereby obtaining higher compression effectin a manner that discrete cosine transform coefficients are dominant ona left side (near DC component) in performing the discrete cosinetransform.

DESCRIPTION OF DRAWINGS

The accompanying drawings, which are included to provide a furtherunderstanding of the invention and are incorporated in and constitute apart of this specification, illustrate embodiments of the invention andtogether with the description serve to explain the principles of theinvention.

In the drawings:

FIG. 1 is a schematic block diagram of an apparatus for encoding a videosignal according to one embodiment of the present invention;

FIG. 2 is a schematic block diagram of an apparatus for decoding a videosignal according to one embodiment of the present invention;

FIG. 3 is a diagram of a neighbor pixel area used in an extensionprediction mode according to a first embodiment of the presentinvention;

FIGS. 4A to 4C are diagrams of neighbor pixels interpolated to use anextension prediction mode according to a first embodiment of the presentinvention;

FIG. 5 is a flowchart for a video signal encoding/decoding sequence thatadopts an extension prediction mode according to a first embodiment ofthe present invention;

FIG. 6A and FIG. 6B are block diagrams of an intra prediction unit of anencoding/decoding apparatus according to a first embodiment of thepresent invention;

FIG. 7 is a flowchart of a sequence for performing a frame-pixelprediction mode according to a second embodiment of the presentinvention;

FIGS. 8A to 8P are diagrams for a method of predicting andreconstructing a current block in an intra prediction unit of anencoding/decoding apparatus according to a second embodiment of thepresent invention;

FIG. 9 is a diagram of a video picture according to a third embodimentof the present invention;

FIG. 10 is a flowchart of a video signal encoding/decoding sequenceaccording to a third embodiment of the present invention;

FIG. 11 is a flowchart of a video signal encoding/decoding sequenceaccording to a fourth embodiment of the present invention;

FIGS. 12A to 12C are exemplary diagrams of blocks indicating a separateintra prediction mode according to a fourth embodiment of the presentinvention;

FIG. 13 is a block diagram of an apparatus for encoding a video signalaccording to a fifth embodiment of the present invention;

FIG. 14 is a block diagram of an apparatus for decoding a video signalaccording to a fifth embodiment of the present invention;

FIG. 15 is a diagram of motion vectors of current and previous framesused for motion vector prediction of a current block according to afifth embodiment of the present invention;

FIG. 16A and FIG. 16B are diagrams for combinations of available motionvector predictors in a motion vector predictor determining methodaccording to a fifth embodiment of the present invention;

FIG. 17 is a flowchart for a sequence of motion vector predictorcompetition and motion compensation according to a fifth embodiment ofthe present invention;

FIG. 18 is a flowchart for a method of determining a motion vectorpredictor candidate according to a sixth embodiment of the presentinvention;

FIG. 19 is a graph of BD rate compression ratio in case according to asixth embodiment of the present invention;

FIG. 20 and FIG. 21 are diagrams for a method of determining a scaledmotion vector predictor according to a seventh embodiment of the presentinvention;

FIG. 22 is a diagram of a block size used in a partially skip modeaccording to an eighth embodiment of the present invention;

FIG. 23A is a diagram for motion vectors of P8*8 blocks adopting aspatial direct mode according to a related art; FIG. 23B is a diagramfor motion vectors of 8*8 block according to a ninth embodiment of thepresent invention;

FIG. 24 is a diagram for performing a general DCT method; and

FIG. 25 is a diagram for a discrete cosine rearrangement transformmethod according to a tenth embodiment of the present invention.

BEST MODE

Additional features and advantages of the invention will be set forth inthe description which follows, and in part will be apparent from thedescription, or may be learned by practice of the invention. Theobjectives and other advantages of the invention will be realized andattained by the structure particularly pointed out in the writtendescription and claims thereof as well as the appended drawings.

To achieve these and other advantages and in accordance with the purposeof the present invention, as embodied and broadly described, a method ofprocessing a video signal according to the present invention includesreceiving prediction mode information, interpolating information and aresidual of a current block, reconstructing an interpolating pixel usingthe interpolating information and a neighbor block, and reconstructingthe current block using the interpolating pixel, the prediction modeinformation and the residual, wherein the interpolating information isgenerated based on a location of the current block.

According to the present invention, the interpolating informationincludes pixel information of the neighbor block used to generate theinterpolating pixel and information of a scheme for generating theinterpolating pixel.

According to the present invention, the interpolating informationfurther includes flag information indicating whether the current blockis located on a boundary area of a picture.

To achieve these and other advantages and in accordance with the purposeof the present invention, as embodied and broadly described, a method ofprocessing a video signal according to the present invention includesreceiving the video signal including pixel prediction information and aresidual of a current block, reconstructing a single pixel of thecurrent block using the pixel prediction information and the residual,and reconstructing an adjacent pixel using the reconstructed pixel, thepixel prediction information and the residual, wherein the pixelprediction information includes a prediction pixel, a prediction schemeand a prediction direction used for intra prediction of the adjacentpixel and wherein the adjacent pixel is included in the current blockand is predicted using other pixels included in the current block.

According to the present invention, the prediction pixel is the pixellocated in the current block or a reconstructed neighbor block.

According to the present invention, the prediction scheme includes ascheme for using a mean value of adjacent pixels and a scheme forprediction according to directionality.

According to the present invention, the scheme for the predictionaccording to the directionality includes calculating a differencebetween two closest pixels in each direction centering on a currentpixel and performing the prediction using a mean value of the two pixelsin the direction having the smallest difference.

According to the present invention, the prediction direction correspondsto one of directions of an intra prediction mode except a DC mode andthe prediction direction is a direction having a smallest value of adifference between two pixels closest to the current pixel in eachdirection centering of a current pixel.

To further achieve these and other advantages and in accordance with thepurpose of the present invention, a method of processing a video signalaccording to the present invention includes receiving the video signalincluding motion vector predictor information and a difference of amotion vector, determining a motion vector predictor candidate set usinga spatial predictor and a temporal predictor, determining motion vectorpredictors using the motion vector predictor information, and performingmotion compensation on a current block using the motion vectorpredictors and the difference of the motion vector, wherein the motionvector predictors are generated using the motion vector predictorcandidate set.

According to the present invention, the motion vector predictorcandidate set determining depends on whether the current block adopts askip mode.

According to the present invention, the skip mode includes one selectedfrom the group consisting of 8*8 block, 8*16 block, 16*8 block and 16*16block as a unit block.

According to the present invention, if the current block is in the skipmode, the motion vector predictor candidate set determining is based ona presence or non-presence of matching between a component-x of thespatial predictor, a component-x of the temporal predictor, acomponent-y of the spatial predictor and a component-y of the spatialpredictor. According to the present invention, if the current block isnot in the skip mode, the motion vector predictor candidate setdetermining is based on a distance between a component-x of the spatialpredictor and a component-x of the temporal predictor and a distancebetween a component-y of the spatial predictor and a component-y of thespatial predictor.

According to the present invention, the motion vector predictorinformation indicates information on the motion vector predictor usedfor the motion vector prediction of the current block.

According to the present invention, the method further includesselecting a motion vector competition using the spatial predictor andthe temporal predictor prior to determining the motion vector predictorcandidate set.

According to the present invention, the motion vector competitionselecting is determined based on sizes of the spatial and temporalpredictors.

According to the present invention, the method further includesselecting a motion vector competition based on the motion vector of aprevious picture and a type of the current block prior to determiningthe motion vector predictor candidate set.

According to the present invention, if an average of a size of themotion vector of the previous picture is 0 or equal to or smaller than2, the motion vector predictor set including the spatial predictor andthe temporal predictor is determined.

According to the present invention, if an average of a size of themotion vector of the previous picture is greater than 2 and if the typeof the current block is a skip mode or 16*16 block, the motion vectorpredictor set including the spatial predictor and the temporal predictoris determined.

According to the present invention, the motion vector predictordetermining further includes generating the motion vector predictorscaled by considering a distance between the current block and a blockfor performing motion estimation.

To further achieve these and other advantages and in accordance with thepurpose of the present invention, an apparatus for processing a videosignal according to the present invention includes a video signalreceiving unit receiving the video signal including prediction modeinformation, interpolating information and a residual of a currentblock, an interpolating pixel reconstructing unit reconstructing aninterpolating pixel using the interpolating information and a neighborblock, and a current block reconstructing unit reconstructing thecurrent block using the interpolating pixel, the prediction modeinformation and the residual, wherein the interpolating pixelreconstructing unit uses the interpolating information generated basedon a location of the current block.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and areintended to provide further explanation of the invention as claimed.

Mode for Invention

Reference will now be made in detail to the preferred embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings. General terminologies used currently and globally are selectedas terminologies used in the present invention. And, there areterminologies arbitrarily selected by the applicant for special cases,for which detailed meanings are explained in detail in the descriptionof the preferred embodiments of the present invention. Hence, thepresent invention should be understood not with the names of theterminologies but with the meanings of the terminologies.

Specifically, coding in the present invention should be understood asthe concept including both encoding and decoding. And, a neighbor blockin the present invention should be understood as a block locatedneighbor to a current decoding-completed block.

FIG. 1 is a schematic block diagram of an apparatus 100 for encoding avideo signal according to one embodiment of the present invention.Referring to FIG. 1, a video signal encoding apparatus 100 according toone embodiment of the present invention includes a transform unit 110, aquantizing unit 115, a coding control unit 120, a de-quantizing unit130, an inverting unit 135, a filtering unit 140, a frame storing unit145, a motion estimating unit 150, an inter prediction unit 160, aninter prediction unit 170, and an entropy coding unit 180.

The transform unit 110 obtains a transform coefficient value bytransforming a pixel value. For this, discrete cosine transform (DCT) orwavelet transform is usable. In particular, the discrete cosinetransform raises compression efficiency by dividing an inputted videosignal into 8*8 blocks and concentrating a signal on the video signalhaving a small number. And, embodiment of discrete cosine transformproposed by the present invention will be described later with referenceto FIG. 23 and FIG. 24. The quantizing unit 115 quantizes the transformcoefficient value outputted by the transform unit 110. The codingcontrol unit 120 controls whether to perform intra-picture coding orinter-picture coding on a specific block or frame. The de-quantizingunit 130 and the inverting unit 135 de-quantize the transformcoefficient value and then reconstruct an original pixel value using thede-quantized transform coefficient value.

The filtering unit 140 is applied to each coded macroblock to reduceblock distortion. In this case, a filter smoothens edges of a block toenhance an image quality of a decoded picture. And, a selection of thisfiltering process depends on a boundary strength and gradient of animage sample around a boundary. The filtered picture is outputted orstored in the frame storing unit 145 to be used as a reference picture.

The motion estimating unit 150 searches reference pictures for areference block most homogenous to a current block using the referencepictures stored in the frame storing unit 145. And, the motionestimating unit 150 forwards position information of the searchedreference block and the like to the entropy coding unit 180 so that theforwarded position information and the like can be included in abitstream.

The inter prediction unit 160 performs prediction of a current pictureusing the reference picture and forwards inter-picture codinginformation to the entropy coding unit 180. In this case, theinter-picture coding information includes a residual that is adifference between a current block and a predicted block (predictor).Fourth to ninth embodiments for the inter prediction unit 160 will beexplained in detail later with reference to the accompanying drawings.

The intra prediction unit 170 performs intra-picture prediction from adecoded sample within the current picture and forwards intra-picturecoding information to the entropy coding unit 180. In particular, theintra prediction unit 170 predicts a current block using pixels of aneighbor block within a current picture and then generates a residualthat is a difference between the current block and a predicted currentblock. First to third embodiments for the intra prediction unit 170 willbe explained in detail with reference to FIGS. 3A to HC.

The entropy coding unit 180 generates a video signal bitstream byentropy-coding the quantized transform coefficient, the inter-picturecoding information, the intra-picture coding information and thereference block information inputted from the motion estimating unit150. In this case, the entropy coding unit 180 can use variable lengthcoding (VLC) scheme and arithmetic coding scheme. The variable lengthcoding scheme transforms inputted symbols into continuous codeword. Inthis case, the length of the codeword may be variable. For instance,frequently generated symbols are represented as short codeword andnon-frequently generated symbols are represented as long codeword. Asthe variable length coding scheme, context-based adaptive variablelength coding (CAVLC) is usable. The arithmetic coding transformscontinuous data symbols into a single prime number. And, the arithmeticcoding can obtain optimal prime bit required for representing eachsymbol. As the arithmetic coding, context-based adaptive binaryarithmetic (CABAC) is usable.

FIG. 2 is a schematic block diagram of an apparatus for decoding a videosignal according to one embodiment of the present invention.

Referring to FIG. 2, a video signal decoding apparatus according to thepresent invention mainly includes an entropy decoding unit 210, ade-quantizing unit 220, an inverting unit 225, a filtering unit 230, aframe storing unit 240, an inter prediction unit 250, and an intraprediction unit 260.

The entropy decoding unit 210 extracts a transform coefficient, motionvector and the like of each macroblock by entropy-decoding a videosignal bitstream. The de-quantizing unit 220 de-quantizes theentropy-decoded transform coefficient and the inverting unit 225reconstructs an original pixel value using the de-quantized transformcoefficient. Meanwhile, the filtering unit 230 is applied to each codedmacroblock to reduce block distortion. A filter enhances an imagequality of a decoded picture by smoothening edges of a block. Thefiltered picture is outputted or stored in the frame storing unit 240 tobe used as a reference picture.

The inter prediction unit 250 predicts a current picture using thereference picture stored in the frame storing unit 240. In this case, asmentioned in the foregoing description, the reference picture is used.Moreover, the inter prediction unit 250 is able to use inter-pictureprediction information (reference picture index information, motionvector information, etc.) forwarded from the entropy decoding unit 210.

Meanwhile, the intra prediction unit 260 performs intra-pictureprediction from a decoded sample within a current picture. A predictionvalue outputted from the intra prediction unit 260 or the interprediction unit 250 and a pixel value outputted from the inverting unit225 are added together to generate a reconstructed video frame.

In the following description, the present invention proposes new variousembodiments for decoding a video signal efficiently in the intraprediction unit 170 and the inter prediction unit 160 of the encodingapparatus and the intra prediction unit 260 and the inter predictionunit 250 of the decoding apparatus. First of all, first to fourthembodiments of the intra prediction units 170 and 260 are explained andfifth to ninth embodiments of the inter prediction units 160 and 250 arethen explained. The first embodiment shall be explained with referenceto FIGS. 3 to 6B, the second embodiment shall be explained withreference to FIGS. 7 to 8B, the third embodiment shall be explained withreference to FIGS. 7 to 8B, and the fourth embodiment shall be explainedwith reference to FIG. 11 and FIG. 12.

FIG. 3 is a diagram of a neighbor pixel area, for which an extensionprediction mode is adopted, according to a first embodiment of thepresent invention, and FIGS. 4A to 4C are diagrams of neighbor pixelsinterpolated to use an extension prediction mode. FIG. 5 is a flowchartfor a video signal encoding/decoding sequence that adopts an extensionprediction mode. FIG. 6A shows a configuration of an intra predictionunit of a video signal encoding apparatus according to a firstembodiment of the present invention, and FIG. 6B shows a configurationof an intra prediction unit of a video signal decoding apparatusaccording to a first embodiment of the present invention.

Referring to FIG. 3, a single frame can be constructed with a set of aplurality of intra-block units. The unit block can include an intra 4*4block, an intra 8*8 block or an intra 16*16 block. Generally, an intraN*N block can perform intra prediction using nine kinds of predictionmodes. The prediction mode performs prediction using four pixels locatedin a left side of a current block and eight pixels located at a top ofthe current block. Yet, in case that a current block is located on aboundary area, as shown in FIG. 3, a pixel used for intra prediction maynot exist. This boundary area may correspond to one of a most left block(A) of an upper end portion, the upper end portion (B), a left sideportion (C) and a right side portion (D).

For the most left block (A) in the upper end portion of the frame, it isable to adopt DC mode (mode 2) that uses a mean value among the ninekinds of prediction modes since neither a left pixel or a top pixel of acurrent block, which uses prediction, does not exist. For the upper endportion (B), prediction mode 1 (horizontal direction), mode 2 (DC) andmode 8 (horizontal up direction) are usable since a top pixel of acurrent block does not exist. And, for the left side portion (C), mode 0(vertical direction), mode 2 (DC), mode 3 (diagonal down left) and mode7 (vertical left) are usable. And, a block corresponding to the rightside portion (D) is able to six kinds of prediction modes except mode 3(diagonal down left) and mode 7 (vertical left).

Thus, the blocks A, B, C and D located on the boundary area have limitedprediction modes. In case that the entropy coding unit 180/210 performsVLC (variable length coding) on the blocks A, B, C and D, maximum fourbits are unconditionally transferred. Therefore, bit loss is generatedas many as empty prediction modes.

In the first embodiment of the present invention, if a current block islocated on a boundary area (A, B, C, D), a step of interpolating anempty neighbor pixel using currently existing neighbor pixels is furtherincluded. Therefore, blocks located on the boundary area can use all thenine kinds of prediction modes without limitation. And, this predictionmode is named an extension intra prediction mode.

In order to use an extension intra prediction mode of the presentinvention, a method of interpolating a neighbor pixel of a block locatedon a boundary area is explained as follows.

First of all, if a current block is a most left block (A) of an upperend portion, different DC prediction values (predictors) are substitutedfor empty modes 0, 1, 3, 4, 5, 6 and 7 and are then transmitted. Forinstance, the transmission is performed in a manner of substituting DCpredictors 108, 118, 138, 148, 98, 88, 158 and 168 for Modes 0, 1, 3, 4,5, 6 and 7, respectively as well as the DC predictor 128 provided to acurrent mode 2, thereby enabling a value having best coding efficiencyand reconstruction ratio to be selected.

If a current block is located at an upper end portion (B), a left sideportion (C) or a right side potion (D), interpolated neighbor pixels areshown in FIGS. 4A to 4C as follows.

FIG. 4A shows interpolated pixels in case that a current block islocated at the upper end portion (B).

Referring to FIG. 4A, pixels I, J, K and L located left to a currentblock have existed as pixels belonging to a pixel A. Yet, pixels x and ato h above the current block fail to exist originally. Therefore, it isable to generate pixels by interpolating the above pixels x and a to husing the previously existing pixels I, J, K and L.

Various methods are available for interpolating the pixels x and a to h.For instance, the pixel I is usable by being intactly interpolated inthe pixels x and a to h. And, a mean value of pixels I and J can beinterpolated in the pixels x and a to h. For another instance, values ofpixels I to L are intactly reflected on the pixels a to d and values ofthe pixels e to h and a mean value of the pixels I to L is interpolatedin the pixel x. The method of interpolating the pixels x and a to h isnot limited to the method of using the pixels I to L. The rest of pixelsare usable for a reconstructed block A (i.e., block left to the currentblock), by which various methods are non-limited.

FIG. 4B shows interpolated pixels in case that a current block islocated at the left side portion (C).

Referring to FIG. 4B, pixels a to h located above a current block haveexisted as pixels belonging to reconstructed blocks A and B. Yet, leftpixels x and I to H fail to exist originally. Therefore, it is able togenerate pixels by interpolating the left pixels x and I to L using thepreviously existing pixels a to h.

In order to generate the pixel x and the pixels I to L, the pixel a canbe intactly interpolated in the pixel X and the pixels I to L to use. Amean value of the pixels a to d can be interpolated in the pixel x andthe pixels I to L. A mean value of the pixels a to d is interpolated inthe pixel x and the values of the pixels a to d can be intactlyreflected on values of the pixels I to L. Yet, this interpolating methodis non-limited to this. And, it is able to use the rest of pixels of thereconstructed blocks A and B.

FIG. 4C shows interpolated pixels in case that a current block islocated at the right side portion (D). Referring to FIG. 4C, pixels a toh and pixels I to H, which are located above a current block and left tothe current block, have existed as pixels belonging to the reconstructedblocks A and B, respectively. Yet, pixels e to h above and right to thecurrent block are the pixels failing to exist previously. Therefore, thepixels can be generated by interpolating the pixels e to h using thepreviously existing pixels a to h and the previously existing pixels Ito L.

Various interpolating methods are usable to generate the pixels e to h.For instance, a mean value of the pixels a to d is usable as values ofthe pixels e to h, a mean value of the pixels I to L is usable as valuesof the pixels e to h, and a value of the pixel d is usable as values ofthe pixels e to h as well. Yet, this interpolating method is non-limitedto this. And, it is able to use the rest of pixels of the reconstructedblocks A and B.

Referring to FIG. 5 and FIG. 6A, the intra prediction unit 170 of thevideo signal encoding apparatus includes an interpolating determiningunit 610, an interpolating block generating unit 620 and a predictionmode determining unit 630.

First of all, if information on a current block is inputted, theinterpolating determining unit 610 determines whether the current blockcorresponds to a boundary area (most left block in a screen upper endportion, upper end portion or right end portion) and then determineswhether to perform interpolating. Whether the current block correspondsto a boundary area is determined based on position information of thecurrent block [S510]. For instance, a position of the current block canbe obtained using a value of a pixel configuring the current block.

Meanwhile, in case of determining to perform the interpolating isdetermined, the interpolating determining unit 510 generatesinterpolating information indicating whether a neighbor pixel of thecurrent block is generated using the interpolating and then enables theinterpolating information to be included in a bitstream. Theinterpolating information can indicate that the current block is locatedat a prescribed position in the boundary area or whether theinterpolating is performed. For instance, the interpolating informationcan exist as a flag.

If it is determined that that the current block corresponds to theboundary area using the position information of the current block, theinterpolating pixel generating unit 620 receives an input of informationon the neighbor block and the current block and then generates aninterpolating pixel using pixels of the neighbor block [S520]. A methodfor the interpolating block generating unit 620 to generate theinterpolating pixel failing to exist previously is as good as theaforesaid method explained with reference to FIGS. 4A to 4C.

If the interpolating determining unit 610 determines that the currentblock is not located on the boundary area, as all neighbor pixels forintra prediction of the current block exist, the information on thecurrent block is inputted to the prediction mode determining unit 630.

By performing the interpolating, after all the neighbor pixels of thecurrent block have been generated, the information on the neighborblocks is inputted to the prediction mode determining unit 630. Theprediction mode determining unit 630 performs nine kinds of intrapredictions of the current block using the interpolated neighbor pixelsand then determines a prediction mode [S530], The prediction modedetermining unit 630 generates a residual that is a difference between ablock (predictor) predicted according to the determined prediction modeand the current block, enables the prediction mode information, theresidual and the formerly generated interpolating information to beincluded in a bitstream, and then transports the bitstream to thedecoding apparatus [S540].

Referring to FIG. 5 and FIG. 6B, the decoding apparatus (in particular,the entropy decoding unit thereof) receives the prediction modeinformation, the interpolating information and the residual [S550].

Subsequently, an interpolating block reconstructing unit 640 of theintra prediction unit 260 of the decoding apparatus reconstructs theinterpolating block using the received interpolating information and theneighbor block [S560]. A step of reconstructing the interpolating blockin the decoding apparatus is identical to the description with referenceto FIGS. 4A to 4C.

A current block reconstructing unit 650 generates intra prediction ofthe current block using the interpolating block generated in the stepS560 and the prediction mode received in the step S550 [S570] and thenreconstructs the current block using the intra prediction and thereceived residual [S580].

Thus, the first embodiment of the present invention interpolates aneighbor pixel and then uses the interpolated neighbor pixel for intraprediction of a current block. Therefore, even if the current block islocated on a boundary area, it is advantageous in coding the currentblock using intra prediction.

A second embodiment of the present invention proposes a new intraprediction mode for reconstructing a plurality of blocks constructing acurrent frame by a pixel unit simultaneously, which differs from thereconstruction in zigzag direction by a block unit in reconstructing acurrent frame using intra prediction. In particular, instead ofperforming intra prediction on a block located at a left upper endportion of a current frame and then performing intra prediction on aright block, intra prediction is sequentially performed on a pluralityof blocks constructing a current frame in preset order. This intraprediction method of a current frame is named a frame-pixel predictionmode and will be explained in detail with reference to FIGS. 7 to 8P.

FIG. 7 is a flowchart of a sequence for performing a frame-pixelprediction mode according to a second embodiment of the presentinvention.

Referring to FIG. 7, in case that a current frame adopts a frame-pixelprediction mode, a current block predicts a first pixel of the currentblock using a neighbor block located in a previous frame that wasreconstructed in advance [S710]. In this case, the first pixel of thecurrent block intra-predicted in the first place may be the pixellocated at a most right lower end portion of the current block, by whichvarious examples of the first pixel are non-limited.

Subsequently, intra prediction of an adjacent pixel is performed usingthe first pixel and pixel prediction information and a residual are thengenerated [S720]. In this case, the pixel prediction information(hereinafter abbreviated PPI) can include at least one selected from thegroup consisting of a prediction pixel (predictor) used for intraprediction of the adjacent pixel, a prediction method and a predictiondirection. The residual is the difference between a pixel predictedaccording to the pixel prediction method and a current pixel and can begenerated by a pixel unit.

Once the intra prediction of the adjacent pixel is performed, each ofthe intra prediction unit 170 of the encoding apparatus 100 and theintra prediction unit 260 of the decoding apparatus according to thepresent invention determines whether the intra prediction of the currentblock has completed [S730]. If the intra prediction is completed, thepixel prediction information (PPI) and residual generated in the stepS702 are transferred [S740].

On the contrary, if the intra prediction of the current block is notcompleted, the step of predicting an adjacent pixel using the previouslypredicted pixels and generating pixel prediction information (PPI) andresidual is repeated. In this case, adjacent pixels, which are predictedusing the prediction-completed pixel, are named second pixel, thirdpixel . . . and Nth pixel in order of prediction, respectively. A methodof performing intra prediction of the first to Nth pixels will beexplained in detail with reference to FIGS. 8A to 8P later.

The inter prediction unit 260 of the decoding apparatus according to thesecond embodiment of the present invention receives the pixel predictioninformation (PPI) and the residual [S750] and then reconstructs thefirst pixel of the current block using the received pixel predictioninformation (PPI) and the received residual [S760]. The residual usedfor the reconstruction of the first pixel includes a difference betweena pixel located in a previous frame and the first pixel, which differsfrom other pixels.

Subsequently, using the reconstructed first pixel, the pixel predictioninformation and the residual, the second pixel is reconstructed [S770].It is then determined whether the reconstruction of the current block iscompleted [S780]. If the reconstruction is not completed, the thirdpixel is reconstructed using the reconstructed first pixel, thereconstructed second pixel, the pixel prediction information and theresidual. This is repeated until the reconstruction of the current blockis completed. A method of predicting and reconstructing a current blockin the intra prediction unit 170/260 of the encoding/decoding apparatusaccording to the second embodiment of the present invention will beexplained with reference to FIGS. 8A to 8P.

Frame-pixel intra prediction mode according to the second embodiment ofthe present invention, as shown in FIG. 8A, firstly intra-predicts afirst pixel (i.e., pixel 0 shown in FIG. 8A) located at a most rightlower end portion in a current block using pixels located in a previousframe. In doing so, it is able to use all nine kinds of prediction modesof the related art to predict the first pixel. As soon as the intraprediction is performed, the intra prediction unit 170 of the encodingapparatus generates pixel prediction information (PPI) and residual. Thepixel prediction information of the first pixel may include pixels(predictors) of the previous frame used for pixel prediction. Aprediction method may include a prediction mode having best efficiencyamong the nine kinds of prediction modes. And, the residual may be thedifference between the first pixel and the pixels used for theprediction of the first pixel.

Intra prediction of a second pixel can be performed using the firstpixel (0). The frame-pixel prediction mode according to the secondembodiment of the present invention uses the following two kinds ofmethods as intra prediction mode of the second to Nth pixels (except thefirst pixel), by which examples of the intra prediction mode arenon-limited.

The first method is an averaging mode for prediction using a mean valueof adjacent pixels. And, the second method is a directional mode forprediction according to directionality. In particular, the first methodperforms intra prediction of a current block using a mean value ofpixels most adjacent t the current pixel to perform intra predictionthereon as a prediction pixel (predictor). The second method calculatesa difference between two pixels closest to a current pixel in each ofeight kinds of possible directions centering on the current pixel andthen determines the direction having the smallest difference as aprediction direction. Using a mean value of two pixels closest to thecurrent pixel in the selected prediction direction as a prediction pixel(predictor) of the current pixel, intra prediction of the current pixelis performed. As soon as the intra prediction is performed, pixelprediction information and residual are generated as well.

Referring to FIG. 8B, intra prediction of a second pixel (a) can beperformed using a mean value of first pixels (0). A difference betweenthe first pixels (0) located in a first direction (omitted due to thesame calculated value of a second direction) centering on the secondpixel (1) is calculated. Intra prediction is then performed using themean value of the first pixels (0) as a prediction pixel. As soon as theintra prediction is performed, pixel prediction information and residualare generated as well.

Referring to FIG. 8C, intra prediction of a third pixel (2) is performedusing the first pixel (0) and the second pixel (1), of which neighborpredictions are completed, as prediction pixels (predictors) of thethird pixel (2). The third pixel (2), as shown in FIG. 8C, is able touse a mean value between the first pixel (0) and the second pixel (1)adjacent to the third pixel (2) as a prediction pixel. Alternatively, aprediction direction is determined by finding a difference betweenpixels close thereto in first or second direction shown in FIG. 8C. Amean of two second pixels (two first pixels (0) in case of selecting thefirst direction or two second pixels (1) in case of selecting the seconddirection) close thereto in the prediction direction can be then used asa prediction pixel. As soon as the intra prediction is performed, pixelprediction information and residual are generated as well.

Referring to FIG. 8D, intra prediction of a fourth pixel (3) isperformed using the first pixel (0) to the third pixel (2), of whichpredictions are completed, as prediction pixels (predictors) of thefourth pixel (3). The fourth pixel (3), as shown in FIG. 8D, is able touse a mean value of the first pixels (0), the second pixels (1) or thethird pixels (2) adjacent to the fourth pixel (3) as a prediction pixel.Alternatively, a prediction direction (e.g., second direction) isdetermined by finding a difference between pixels close thereto in eachof first to third directions shown in FIG. 8D, (e.g., a differencebetween two second pixels (1) in the first direction) and then comparingthe found differences to each other. A mean of two pixels (third pixels(2)) close thereto in the prediction direction (second direction) can beused as a prediction pixel. As soon as the intra prediction isperformed, pixel prediction information and residual are generated aswell.

Referring to FIG. 8E, intra prediction of a fifth pixel (4) is performedusing the first pixel (0) to the fourth pixel (3), of which predictionsare completed, as prediction pixels (predictors) of the fifth pixel (4).The fifth pixel (4), as shown in FIG. 8E, is able to use a mean value ofthe first pixels (0), the second pixels (1) or the third pixels (2)adjacent to the fifth pixel (4) as a prediction pixel. Alternatively, aprediction direction is determined by finding a difference betweenpixels close thereto in each of first and second directions shown inFIG. 8E, and then comparing the found differences to each other. A meanof two pixels close thereto in the determined prediction direction canbe used as a prediction pixel.

For instance, referring to FIG. 8E, a difference between two pixels isfound in the first direction including the third pixel (2) and thefourth pixel (3). And, a difference between two pixels is found in thesecond direction including the first pixel (0) and the second pixel (1).The found differences are compared to each other. The direction having asmaller value of the two is determined as a prediction direction. If thefirst direction is selected as the prediction direction, a predictionpixel (predictor) for intra prediction of the fifth pixel (4) maycorrespond to a mean of the first and fourth pixels (2) and (3) adjacentto the fifth pixel (4) in the first direction. As soon as the intraprediction is performed, pixel prediction information and residual aregenerated as well.

By the above-explained methods, as shown in FIGS. 8F to 8P, it is ableto perform intra predictions on a sixth pixel (5) to a sixteen pixel(15) using the prediction-completed neighbor pixels. As soon as theintra prediction is performed, pixel prediction information relevant toeach pixel and residual can be generated as well.

Whenever intra prediction of each of the first to N^(th) pixels isperformed and the pixel prediction information on each of the pixels andthe corresponding residual are generated, it is determined whether intraprediction of a current block is completed. If the intra prediction ofthe current block is completed, the pixel prediction information andresiduals relevant to the first to N^(th) pixels are transferred.

The intra prediction unit 270 of the video signal decoding apparatus ofthe present invention receives the pixel prediction information andresiduals relevant to the first to N^(th) pixels and then performsreconstruction of the current block. In particular, the intra predictionunit 270 reconstructs the first pixel of the current block using thereceived pixel prediction information and residual relevant to the firstpixel and then reconstructs the second pixel of the current block usingthe reconstructed first pixel and the received pixel predictioninformation and residual relevant to the second pixel. In this manner,reconstructions are sequentially performed on the pixels of the currentblock up to the N^(th) pixel to complete the reconstruction of thecurrent block.

Thus, the video signal decoding method according to the secondembodiment of the present invention enables more accurate prediction ina manner that a current block uses adjacent pixels of a current blockfor intra prediction as well as pixels of a neighbor block. Moreover,since adjacent pixels are predicted using predictor values selected fromat least two directions, a block having a coefficient of more zeros isgenerated in case of discrete cosine transform. Therefore, the videosignal decoding method according to the second embodiment of the presentinvention is advantageous in raising coding efficiency.

A third embodiment of the present invention proposes an intra skip modethat uses an intact pixel value of a neighbor block in performing intraprediction on a current block instead of performing prediction from aneighbor block in a specific case.

FIG. 9 is a diagram of a video picture according to a third embodimentof the present invention, and FIG. 10 is a flowchart of a video signalencoding/decoding sequence according to a third embodiment of thepresent invention.

According to a related art, intra prediction uses 16*16 block, 8*8 blockand 4*4 block and is performed using nine kinds of intra predictionmodes. Yet, when an intra prediction mode is used due to reducedinter-picture correlation, if a current block is homogeneous to aneighbor block, using the neighbor block intact may be more efficientthan performing the related art intra prediction.

Referring to FIG. 9, assume that inter prediction is not available dueto reduced correlation of a box A appearing on a hat shown in FIG. 9 ora box B left to a face with a previous picture. In this case, intraprediction is performed. Since blocks within a box are homogeneous, apixel value of a neighbor block is used as a pixel value of a currentblock as it is. And, using an intra skip mode may be efficient insteadof performing intra prediction separately. In this case, it isunderstood that prediction mode information and residual are nottransferred.

Referring to FIG. 10, first of all, a current block determines whetherto perform intra prediction or inter prediction [S1010]. In this case,the step of determining the intra or inter prediction of the currentblock is performed in the same manner of the related art.

Once the step S101 determines that the current block performs the intraprediction, an intra skip mode can be adopted only if the current blockhas the efficiency better than that of the case that the current blockperforms the related art intra prediction.

The current block calculates an RD cost of the case of using an intraprediction mode and an RD cost of the case of using an intra skip mode[S1020]. In this case, the RD cost (hereinafter called efficiency) iscalculated as Formula 1.J=D+λR  [Formula 1]

In Formula 1, ‘D’ is a sum of square distortion (SSD) and ‘R’ is arequired bit number.

After the efficiencies have been calculated, if the case for the currentblock to use the intra skip mode has better efficiency, the intra skipmode is selected [‘yes’ in the step S1030], a prediction block isdetermined, and intra skip information and selected prediction blockinformation are then transferred [S1040]. In this case, the intra skipinformation can include flag information (intra Skip flag) indicatingwhether the current block uses the intra skip mode.

The intra prediction unit 260 of the decoding apparatus according to thepresent invention receives the intra skip information and the predictionblock information [S1050]. If the intra skip information is in a formatof flag information, the meaning of the intra skip mode flag informationis represented as Table 1.

TABLE 1 Separate intra prediction flag (intra_skip_flag) Meaning 0Perform intra prediction mode of the related art 1 Perform intra skipmode

If the received intra skip mode flag information (intra_skp_flag) is setto 1, the intra prediction unit 260 of the decoding apparatus accordingto the present invention intactly uses a pixel value of a predictionblock as a pixel value of the current block according to the predictionblock information [S1060].

On the contrary, if it is determined that the current block uses theintra prediction mode [‘no’ in the step S1030], intra N*N prediction isperformed and residual and prediction mode information are transferred[S1070].

Moreover, the intra prediction unit 260 of the decoding apparatusaccording to the present invention receives the residual and predictionmode information and then reconstructs the current block using therelated art intra prediction method [S1080].

Thus, in case that an intra skip mode is used for intra prediction of acurrent block according to the third embodiment of the presentinvention, prediction and reconstruction of a video signal, of whichinter prediction is inefficient but which is homogeneous to a neighborblock, can be efficient. It is unnecessary to perform intra prediction.And, it is also unnecessary to transfer residual and CBP. Therefore, aused bitrate can be lowered.

A frame for performing intra prediction is coded into intra 16*16 block,intra 8*8 block and intra 4*4 block. In each mode, a specific block ispredicted using a previously reconstructed block located above thespecific block and a previously reconstructed block located left to thespecific block. In particular, a mode of using intra 4*4 block is usedin a high frequency region. For intra prediction of a current block,prediction blocks (predictors) are restricted to use the blocks locatedabove and left to the current block only. This is not insufficient forprediction and reconstruction of the current block. If the current blockis located on a boundary, this is inefficient. Therefore, using a blockto be reconstructed next as well as a previously reconstructed block forprediction of a current block enables more accurate prediction.

To solve this problem of the intra prediction mode, a fourth embodimentof the present invention proposes a separate intra prediction mode thatis a new intra prediction method of a current frame including a currentblock. As a single intra frame can be divided into tow or fourindependent subframes, various separate intra prediction modes can existin a separated frame. Unlike consecutive frames having a motion, highredundancy exists between subframes for moving sub-pixels. Therefore, aseparate intra prediction mode in a subframe of intra frame can beconsiderably efficient.

FIG. 11 is a flowchart of a video signal encoding/decoding sequenceaccording to a fourth embodiment of the present invention, and FIGS. 12Ato 12C are exemplary diagrams of blocks indicating a separate intraprediction mode according to a fourth embodiment of the presentinvention.

Referring to FIG. 11, the intra prediction unit 170 of the encodingapparatus according to the present invention calculates an RD cost byperforming the related art intra prediction on a current frame [S1110].And, the intra prediction unit according to a fourth embodiment of thepresent invention receives an input of separate intra mode structureinformation (SIMSI). The separate intra mode structure information(SIMSI) includes a type of subframe and a structure of separate intramode. The type of the subframe may include a plurality of 16*16, 8*8 or4*4 blocks, a single 16*16, 8*8 or 4*4 block, or a single or a pluralityof pixel units, by which examples of the present invention arenon-limited. The structure of the separate intra mode can include IPstructure, IPPP structure or IBBP structure, which will be explained indetail with reference to FIGS. 12A to 12C later.

After the related art intra prediction has been performed on the currentframe, the separate intra prediction of the current frame according tothe structure of the separate intra mode is performed using the separateintra mode structure information (SIMSI) [S1120].

In case of the related art intra prediction and the separate intra modeprediction for the current frame, RD costs are calculated. If theefficiency (RD cost) of the separate intra mode prediction is betterthan the other, the separate intra mode prediction is selected [S1130].

Subsequently, separate intra mode information (hereinafter abbreviatedSIDI) including the type of the selected separate intra mode and theseparate intra mode structure and a residual between a block (predictor)used for prediction and a current block are transferred [S1140]. And, itis also able to transfer separate intra prediction flag information(separate_intra_prediction_flag) indicating whether the separate intraprediction mode is selected.

If the separate intra prediction flag information is transferred fromthe encoding apparatus, the intra prediction unit 260 of the decodingapparatus according to the present invention receives the separate intraprediction flag information. And, the meaning of the separate intraprediction flag information is represented as Table 2.

TABLE 2 Separate intra prediction flag (separate_intra_skip_flat)Meaning 0 Perform intra prediction mode of the related art 1 Preformseparate intra prediction mode

If the separate intra prediction flag is set to 0, the related art intraprediction mode is performed for reconstruction of the current frame. Ifthe separate intra prediction flag is set to 1, the separate intraprediction mode is performed. Hence, the separate intra mode information(SIMI) and the residual are received [S1150]. And, a first subframegroup of the current frame is reconstructed using the separate intramode information (SIMI), the residual and a previous frame [S1160].Moreover, a second subframe group is reconstructed using the separateintra mode information (SIMI), the residual and the first subframe group[S1170].

If the selected separate intra mode structure is the IPPP structure, athird subframe group is reconstructed using the separate intra modeinformation, the residual, the first subframe group and the secondsubframe group. And, a fourth subframe group is reconstructed using theseparate intra mode information, the residual, the first subframe group,the second subframe group and the third subframe group.

If the selected separate intra mode structure is the IBBP structure, athird subframe group is reconstructed using the separate intra modeinformation, the residual, the first subframe group and the secondsubframe group. And, a fourth subframe group is reconstructed using theseparate intra mode information, the residual, the first subframe groupand the second subframe group.

In the following description, a method of predicting a separate intraprediction mode according to a separate intra mode structure isexplained with reference to FIGS. 12A to 12C.

Referring to FIG. 12A, a current frame (I frame) can be divided into afirst subframe and a second subframe by a subframe unit and can belocated by an interlace scanning scheme. If the current frame is dividedinto equal parts, the left part corresponds to the first subframe andthe right part corresponds to the second subframe. This non-limitsvarious examples of the present invention. The first and secondsubframes can be alternately arranged as shown in FIG. 12A. A set ofthese first subframes is named a first subframe group and a set of thesesecond subframes is named a second subframe group.

First of all, the first subframe group can be coded using the relatedart intra prediction mode and the second subframe group can be codedusing intra prediction within a current frame with reference to thefirst subframe group.

FIG. 12B shows IPPP structure and IPPP prediction method in separateintra prediction mode. A current frame can be divided into total fourkinds of subframes. And, sets of the four kinds of the subframes caninclude first to fourth subframe groups, respectively.

Referring to FIG. 12B, the first subframe group is coded by performingprediction using the related art intra prediction mode. Subsequently,the second subframe group is coded by performing intra prediction usingthe first subframe group. The third subframe group performs intraprediction using the first and second subframe groups. And, the fourthsubframe group performs intra prediction using the first to thirdsubframe groups.

FIG. 12C shows IBBP structure and IBBP prediction method in separateintra prediction mode. Like FIG. 12B, a current frame can be dividedinto total four kinds of subframes.

Referring to FIG. 12C, in the IBBP prediction method, a first subframegroup performs intra prediction using the related art intra predictionmode, a second subframe group performs intra prediction using the firstsubframe group, a third subframe group performs intra prediction usingthe first and second subframe groups, and a fourth subframe groupperforms intra prediction using the first and second subframe groups.

In this case, the arranged sequences of subframes in the separate intraprediction mode are not limited to those shown in FIGS. 12A to 12C. And,various sequences are selectable. Moreover, the structure and theprediction method, as mentioned in the foregoing description, can beincluded in the separate intra mode information.

Thus, in case of using a separate intra prediction mode according to thefourth embodiment of the present invention, a prediction block is notlimited to the block located above or left to the prediction block,whereby accurate prediction of a current frame is possible.

A method of decoding a video signal according to the present inventionproposes new modes for high efficiency regarding motion vectorestimation and compensation as well as a new intra prediction mode.

In the following description, fifth to ninth embodiments of the interprediction unit 160/250 are explained. The fifth embodiment is explainedwith reference to FIGS. 13 to 17, the sixth embodiment is explained withreference to FIG. 18 and FIG. 19, the seventh embodiment is explainedwith reference to FIG. 20 and FIG. 21, the eighth embodiment isexplained with reference to FIG. 22, and the ninth embodiment isexplained with reference to FIG. 23A and FIG. 23B.

First of all, the inter prediction unit 160/250 of the video signaldecoding apparatus uses a median filter to determine a motion vectorpredictor (hereinafter abbreviated mvp). Yet, since there exists anerror between a motion vector predictor (mvp) and an estimated motionvector, an important role of an encoder is to find an accurate motionvector predictor mvp). In the following description of a fifthembodiment of the present invention, a method (hereinafter named motionvector competition) of determining a more accurate motion vectorpredictor (mvp) is explained with reference to FIGS. 13 to 17.

FIG. 13 is a block diagram of an apparatus for encoding a video signalwhich further includes a motion vector predictor generating unit 1350.And, FIG. 14 is a block diagram of an apparatus for decoding a videosignal which further includes a motion vector predictor generating unit1445.

The motion vector predictor generating unit 1350 of the encodingapparatus determines a motion vector predictor (MVP) candidate set by apreset method, determines a motion vector predictor having the bestefficiency among motion vector predictors available from the determinedset, and transfers motion vector predictor information (MVPI) relevantto the determined motion vector predictor.

Thus, in order to use a more accurate motion vector predictor for motionvector estimation and compensation, according to a fifth embodiment ofthe present invention, a candidate set of more motion vector predictors(mvp) is set and a most efficient motion vector predictor (mvp) of themotion vector predictor candidate set is used. First of all, motionvector predictors (mvp) can be mainly classified into spatial predictor,temporal predictor and spatial-temporal predictor according to types.

FIG. 15 is a diagram of motion vectors of current and previous framesused for motion vector prediction of a current block.

Referring to FIG. 15, a spatial predictor uses a motion vector of acurrent frame (frame N). If a motion vector of a current vector is mv,the spatial predictor can include mv_med for adopting a median from mva,mvb, mvc and mvd using motion vectors of blocks a, b and c of the frameN and mv_spaEXT for adopting a median among at least three motion vectorpredictors.

Referring to FIG. 15, a temporal predictor uses a motion vector of aprevious frame (frame N-I) and is able to include mv_col using a motionvector of a block co-located with a current block in a previous frame, apredictor using a median of mv_col, mvtO . . . mvt3, and a predictorusing a median of MVcol, MVtO . . . MVt 8.

And, a spatial-temporal predictor can include a motion vector predictor(mv_spt) using a mean value of mv_col, mv col, mva, mvb and mvc.

The spatial predictor essentially used among motion vector predictors isnamed a first motion vector predictor. And, a spatial or temporalpredictor additionally used in the fifth embodiment of the presentinvention is named a second motion vector predictor. The first motionvector predictor, as shown in FIG. 14, can be a median motion vector(mv_med) and the second motion vector predictor can be a motion vectorpredictor-a (mva) or mv_col using a motion vector of a block locatedleft to a current block, by which various examples of the presentinvention are non-limited.

As mentioned in the above description, a motion vector predictor is notdetermined using a fixed median but is determined from variouscandidates. Therefore, accuracy of the motion vector predictor can beenhanced. However, if the motion vector predictors are fixed to tenkinds of candidates, it may be inefficient in coding a picture.

Therefore, a fifth embodiment of the present invention sets a new motionvector predictor candidate set (MVPCS) and proposes a condition fordetermining it. The motion vector predictor candidate set is representedas Table 3.

TABLE 3 Motion vector - Motion vector - Set x component y component 1 SxSy 2 Sx Sy or Ty 3 Sx or Tx Sy 4 Sx or Tx Sy or Ty

In Table 3, ‘S’ indicates a spatial predictor and ‘T’ indicates atemporal predictor.

A spatial predictor for the motion vector predictor candidate set usesmv_med only, and mvcol is usable as a temporal predictor, whichnon-limits various examples of the present invention. If a set 4 isdetermined as the motion vector predictor candidate set, availablemotion vector predictors include four kinds of cases (Sx-Sy, Sx-Ty,Tx-Sy, Tx-Ty). Therefore, it is able to determine a more accurate motionvector predictor based on a motion cost of each of the four kinds ofcases.

FIG. 16A and FIG. 16B are diagrams for combinations of available motionvector predictors in a motion vector predictor determining methodaccording to a fifth embodiment of the present invention. FIG. 16A showsthat a current block corresponds to a skip mode, whereas FIG. 16B showsa case except the skip mode.

First of all, since a skip mode of a related art uses a motion vectorpredictor of a previous frame as a motion vector of a current block,there exists a single motion vector predictor candidate only. On thecontrary, in a method according to the motion vector predictorcompetition of the present invention, a motion vector predictorcandidate uses a second motion vector predictor as well as a firstmotion vector predictor, whereby maximum four combinable candidates canexist.

Referring to FIG. 16A, a first motion vector predictor of a currentblock can be ‘A’ and a second motion vector predictor can be ‘B’. Hence,motion vector candidates according to the combination thereof caninclude ‘a (first motion vector predictor)’, ‘b (second motion vectorpredictor)’, ‘c (first motion vector predictor component x−second motionvector predictor component y)’, or ‘d (second motion vector predictorcomponent x−first motion vector predictor component y)’. In this case, 2bits can be required for motion vector predictor information for amotion vector predictor.

Referring to FIG. 16B, if a current block is not in a skip mode and ispartitioned, more bits are required for motion vector predictorinformation. Hence, a distance (mv1-mv2) between a first motion vectorpredictor and a second motion vector predictor is measured. When themeasured distance between the first and second motion vector predictorsis equal to or smaller than ½ pixel, if the two predictors are close toeach other, the first motion vector predictor is determined as a motionvector predictor of a current block and a related art motion vectorprediction method is used. In this case, it is able to use a motionvector predictor competition flag (mv_competition_flag) indicatingwhether a current block uses the related art motion vector predictionmethod or the motion vector competition.

Once the first motion vector predictor is determined as the motionvector predictor of the current block, the motion vector predictorcompetition flag (mv_predictor_competition_flag) indicating that therelated art motion vector prediction method is used is set to 0 and isthen transferred. The meaning of the motion vector predictor competitionflag information is represented as Table 4.

TABLE 4 Mv_competition_flag Meaning 0 Current block does not use MVcompetition (related art MV competition is used) 1 Current block uses MVcompetition.

FIG. 17 is a flowchart for a sequence of motion vector predictorcompetition and motion compensation according to a fifth embodiment ofthe present invention.

Referring to FIG. 17, before a motion vector predictor candidate set isdetermined, Formula 2 is calculated [S1710]MV_(col)>2*max(MV_(spa) _(—) _(max),MV_(temp) _(—) _(max))  [Formula 2]

If a value of mv_col using a motion vector of a block co-located with acurrent block in a previous frame is too great, it means thatcorrelation between the previous frame and the current block is reducedtoo much. Hence, instead of using a temporal predictor for a case thatthe condition of Formula 2 is met [‘yes’ in the step S1710], a motionvector predictor is determined using a spatial predictor only [S1720].Whether to use a spatial predictor as a motion vector predictor only canbe separately determined for a component x and a component y.

On the contrary, if the condition of Formula 2 is not met [;n’ in thestep S1710], a motion vector predictor candidate set to use isdetermined by calculating the condition of Formula 3 or Formula 4.Formula 3 shows a condition for a motion vector skip mode and Formula 4is a condition for a case except a skip mode.

$\begin{matrix}{{{{{Set}\; 1\text{:}\mspace{14mu} S_{x}} = T_{x}},{S_{y} = T_{y}}}{{{{Set}\; 2\text{:}\mspace{14mu} S_{x}} = T_{x}},{S_{y}!=T_{y}}}{{{{Set}\; 3\text{:}\mspace{14mu} S_{x}}!=T_{x}},{S_{y} = T_{y}}}{{{{Set}\; 4\text{:}\mspace{14mu} S_{x}}!=T_{x}},{S_{y}!=T_{y}}}} & \left\lbrack {{Formula}\mspace{14mu} 3} \right\rbrack\end{matrix}$

$\begin{matrix}{{{{{Set}\; 1\text{:}\mspace{14mu}{{S_{x} - T_{x}}}} < 3},{{{S_{y} - T_{y}}} < 3}}{{{{Set}\; 2\text{:}\mspace{14mu}{{S_{x} - T_{x}}}} < 3},{{{S_{y} - T_{y}}} \geq 3}}{{{{Set}\; 3\text{:}\mspace{14mu}{{S_{x} - T_{x}}}} \geq 3},{{{S_{y} - T_{y}}} < 3}}{{{{Set}\; 4\text{:}\mspace{14mu}{{S_{x} - T_{x}}}} \geq 3},{{{S_{y} - T_{y}}} \geq 3}}} & \left\lbrack {{Formula}\mspace{14mu} 4} \right\rbrack\end{matrix}$

The motion vector predictor generating unit 1350/1445 determines a mostefficient motion vector predictor candidate set using the abovecondition. For instance, as a result of examining the conditions ofmv_med(Sx, Sy) and mv_col (Tx, Ty), if a set 3 is determined as themotion vector predictor candidate set, there van be two kinds (Sx-Sy orTx-Sy) of available motion vector predictors (mvp). In this case, bymeasuring a motion cost in case of using each of the motion vectorpredictors, a motion vector predictor (Sx-Sy) of the current block isdetermined [S1740].

Subsequently, motion vector predictor (mvp) information indicating whatkind of combination of motion vector predictors (Sx-Sy) is used istransferred [S1750]. In this case, the motion vector predictorinformation can include information on a spatial predictor if mv_col istwice greater than a maximum value of either mv_spa_max or mv_temp_max[‘yes’ in the step S1710].

The motion compensating unit 1445 of the decoding apparatus according tothe present invention receives the motion vector predictor (mvp)information and then determines a motion vector predictor candidate setby calculating the condition of Formula 3 or Formula 4 on the currentblock by itself [S1760].

Subsequently, using the received motion vector predictor information andthe condition of the determined set, the motion compensating unit 1445performs motion compensation of the current block [S1770].

Therefore, by selecting a predictor more homogeneous to a motion vectorof a current block using various motion vector predictor candidates,more accurate motion vector prediction is possible.

In case of using the related art motion vector competition, thereduction of bitrate is about −0.5% of the case of using theconventional AVC scheme. In case of using the motion vector competitionaccording to the fifth embodiment of the present invention, the bitrateis reduced about −0.8%. Moreover, PSNR (peak signal to noise ratio) incase of using the motion vector competition according to the fifthembodiment of the present invention is enhanced by about 0.028 dB morethan that of the case of using the related art method.

Therefore, the motion vector competition according to the fifthembodiment of the present invention selects a motion vector predictormore homogeneous to a motion vector of a current block using variousmotion vector predictor candidates, thereby enabling more accuratemotion vector prediction.

A sixth embodiment of the present invention is able to determine amotion vector predictor candidate according to a mean value of motionvectors of a previous frame and a type of a current block. The motionvector predictor candidate determining method will be explained withreference to FIG. 18.

First of all, since frame having big motions are consecutive in general,it is able to determine whether a current frame has correlation with theprevious frame according to an average size of motion vectors of theprevious frame. If a mean value of motion vectors of a previous frame isequal to or greater than a threshold, a motion of a current frame isgreater than that of the previous frame. Hence, correlation with theprevious frame is reduced. Accordingly, at least two spatial predictorsare usable as motion vector predictor candidates. On the contrary, if amean value of motion vectors of a previous frame is smaller than athreshold, a motion of a current frame is smaller than that of theprevious frame. Hence, correlation with the previous frame is great.Accordingly, it is efficient to use a temporal predictor, which uses amotion vector of the previous frame. In this case, the motion vectorpredictor candidate can include at least one temporal predictor as wellas at least one spatial predictor.

Therefore, in a motion vector predictor candidate determining methodaccording to a sixth embodiment of the present invention, it isdetermined whether an average (mv_pre_avg) of a motion vector size of aprevious frame is equal to or smaller than 1 [S1810]. If the average(mv_pre_avg) of a motion vector size of a previous frame is grater than1, it indicates a current frame including a current block is the framehaving a great motion. In this case, according to the sixth embodimentof the present invention, since correlation between the current blockand the previous frame is small, it is efficient to use two spatialpredictors. Yet, if the current block includes sub-blocks having smallhomogeneity, it is not efficient to use two spatial predictors.

Hence, it is checked whether a block type of the current block is a skipmode or 16*16 mode [S1820]. If the block type is neither the skip modeor the 16*16 mode [‘no’ in the step S1820], the current block ispartitioned into sub-blocks and the correlation between the partitionedsub-blocks is small. In this case, it is more efficient to use thetemporal predictor than to use the spatial predictor as a second motionvector predictor [S1830].

If the current block is the skip mode or the 16*16 mode, it is efficientto use a spatial predictor as a second motion vector predictor as wellas use a spatial predictor as a first motion vector predictor [S1840].

If the average of the motion vectors of the previous frame is smallerthan 1 [‘yes’ in the step S1810], it means that the current frame is aslow picture having great homogeneity between the current block and theprevious frame. Therefore, it is efficient to use spatial predictors asfirst and second motion vector predictors.

Thus, in a manner of determining a motion vector predictor candidatedifferent according to the homogeneity between a current block and aprevious frame and a type of the current block, it is able to enhanceclarity of motion prediction of the current block.

The motion vector predictor information generated by the motion vectorcompetition according to the fifth or sixth embodiment of the presentinvention requires two bits. If a current block is 8*8 block, it is ableto require motion vector predictor information to have maximum 16 bitsaccording to partitioning. This may result in that the related artmotion vector prediction method is efficient. Therefore, each block caninclude motion vector competition flag information (mv_competition_flag)indicating whether to follow the motion vector competition.

Table 5 represents conditions used for the test to compare effect of themotion vector competition according to the sixth embodiment of thepresent invention to effect of the related art. Table 6 represents amotion vector candidate used in performing motion prediction on theconditions shown in Table 5.

TABLE 5 No. of frames 150(15 Hz)/300(30 Hz) Motion estimation FullSearch No. of references 4 Motion vector searchrange ±32 GOP structureIPPP Entropy coding scheme CAVLC Quantization coefficient (QP)22/27/32/37 for I slice 23/28/33/38 for P slice

TABLE 6 Case 1 Skip mode mv_spaEXT, mva Except skip mode mv_med, mv_colCase 2 Skip mode mv_med, mva Except skip mode mv_med, mv_col Case 3 Allcases mv_med, mv_col

In this case, if three vectors are available, ‘mv_spaEXT’ is determinedusing mva, mvb and mvc shown in FIG. 15. Otherwise, ‘mv_spaEXT’ isdetermined using an available motion vector among mva, mvb and mvc.

FIG. 19 shows BD rate gains for the case of using motion vectors ofCases 1 to 3 as motion vector predictor candidates and the case of usinga motion vector predictor determined according to the sixth embodimentof the present invention. The BD rate is an index indicating codingperformance and means how much a bitrate is compressed by maintainingthe same image quality.

Referring to FIG. 19, it can be observed that the compressed extent ofthe bitrate in case of the sixth embodiment of the present invention isgenerally increased more than that of the case of using the motionvector predictor candidates shown in Cases 1 to 3. And, it can beobserved that PSNR [dB] is substantially increased by about O.1 dB morethan that of the video signal decoding method according to the fifthembodiment of the present invention.

In the following description, a new method of using a generated motionvector predictor by considering a distance between a block forperforming motion estimation of a current block and a neighbor blockaccording to a seventh embodiment of the present invention is explainedwith reference to FIG. 20 and FIG. 21.

In the related art, a motion vector predictor of a current block isgenerated using three blocks neighbor to the current block. FIG. 20shows a current block and three neighbor blocks. And, the three neighborblocks include a block left to the current block, a block above thecurrent block and a block upper-right to (in a diagonal-up-rightdirection of) the current block. Referring to FIG. 20, a motion vectorof the current block is named mvc, a motion vector of the left block ofthe current block is named mv1, and a motion vector of the upper-rightblock is named mvur. In order to determine a motion vector predictor ofthe current block, it is checked whether at least one of referenceindexes of the three neighbor blocks is equal to a reference index ofthe current block. If there is one neighbor block having the samereference index of the current block, a motion vector of thecorresponding neighbor block is determined as a motion vector predictor.Otherwise (i.e., if there are at least two or more neighbor blockshaving the same reference number), a median of motion vectors of thethree neighbor blocks is selected and determined as a motion vectorpredictor of the current block. Moreover, a reference index isdetermined as a smallest number among the reference indexes of the threeneighbor blocks.

However, if a reference index of the current block has a reference indexdiffering from the reference indexes of the three neighbor blocks, themotion vector predictor determined in the above manner may have a bigdifference from a motion vector of the current block. In order to makethe determined motion vector predictor become homogeneous to a motionvector of the current block, it is efficient to use ‘scaled motionvector predictor’ according to a seventh embodiment of the presentinvention.

FIG. 21 is a flowchart for a method of performing motion predictionusing a scaled motion vector predictor according to a seventh embodimentof the present invention.

Referring to FIG. 21, in performing motion vector prediction, it ischecked whether there is a neighbor block having the same value of areference index of a current block [S2110]. If there is a neighbor blockhaving the same value of a reference index of a current block, therelated art motion vector competition is adopted [S2120].

Yet, if a reference index of the current block fails to match that of aneighbor block [‘no’ in the step S2110], scaled motion vector predictors(SMVP) are calculated [S2130]. And, it is able to find the scaled motionvector predictor using Formula 5.

$\begin{matrix}{{{MV}_{L}^{\prime} = {\frac{f_{ME} - f_{C}}{f_{L} - f_{C}}*{MV}_{L}}},{{MV}_{U}^{\prime} = {\frac{f_{ME} - f_{C}}{f_{U} - f_{C}}*{MV}_{U}}},{{MV}_{UR}^{\prime} = {\frac{f_{ME} - f_{C}}{f_{UR} - f_{C}}*{MV}_{UR}}}} & \left\lbrack {{Formula}\mspace{14mu} 5} \right\rbrack\end{matrix}$

In Formula 5, f_(ME) indicates a frame number of a block for performingmotion estimation on a current block, f_(c) indicates a frame number ofthe current block, and f_(L), f_(u) and f_(UR) indicate left, upper andupper right blocks of the current block, respectively.

A motion vector predictor of the current block is determined from thescaled motion vector predictors, and motion vector prediction of thecurrent block is performed using the determined scaled motion vectorpredictor [S2140]. And, a motion vector difference (mvd), a referenceindex and scaled motion vector predictor information are transferred[S2150]. Moreover, it is able to transfer scaled motion vector predictorflag information (scaled mv_predictor_flag) indicating whether thescaled motion vector predictor is used for the motion vector predictionof the current block. In case that the scaled motion vector predictorinformation is used, the meaning of the flag information can berepresented as Table 7.

TABLE 7 scaled_mv_predictor_flag Meaning 0 Current block does not usescaled MV predictor. (Related art MV predictor competition is used) 1Current block uses scaled MV predictor.

The inter prediction unit 250 of the decoding apparatus according to thepresent invention receives the scaled motion vector predictorinformation, the mvd and the reference index [S2160] and thenreconstructs a motion vector of the current block using the receivedones [S2170]. In case of transferring the scaled motion vector predictorflag information (scaled mv_predictor_flag), the scaled motion vectorpredictor information may not be transferred. In this case, if a valueof the scaled motion vector predictor flag information (scaledmv_predictor_flag) is 1, it is able to find a scaled motion vectorpredictor using the received reference index, the received mvd and themotion vector of the neighbor block. The motion vector of the currentblock is then reconstructed using the found scaled motion vectorpredictor.

In a method of predicting a motion vector of a current block accordingto a seventh embodiment of the present invention, a motion vectorpredictor is determined by considering a distance between a frameindicated by a reference index of the current block and a frameindicated by a reference index of a neighbor block, whereby thedetermined motion vector predictor can have a value more homogeneous tothat of the motion vector of the current block. Therefore, it is able toraise accuracy of prediction.

A method of predicting a current block using a motion vector can code acurrent block more accurately in a picture having a big motion. Yet, acorresponding bit demanding rate is high. Hence, this method uses a skipmode on predetermined condition. The skip mode uses a motion vector(mvP) of a neighbor block as a motion vector of a current block insteadof calculating a motion vector (MV) difference using a neighbor block asa motion vector predictor. In case of using a skip mode, suchinformation as residual, reference index, CBP (coded block pattern) andthe like is not coded. Yet, H.264 allows 16*16 block to be used for acase of adopting a skip mode only. Hence, two or more motion vectors arenot allowed for each 16*16 block.

Eighth embodiment of the present invention proposes a partially skipmode that enables a unit block having a motion vector to have varioussizes in a skip mode.

FIG. 22 is a diagram of a block size used in a partially skip mode.

Referring to FIG. 22, a partially skip mode is able to use 16*8 block,8*16 block or 8*8 block as well as 16*16 block. The partially skip modecan have maximum four motion vectors (in case of using 8*8 block) within16*16 block, whereas the related art skip mode has a single motionvector per 16*16 block.

Therefore, a current block decoding method using a partially skip modeminimizes picture distortion and activates a skip mode more, therebyraising coding efficiency.

Since a partially skip mode according to an eighth embodiment of thepresent invention uses a new block type, it is able to further transferinformation on a type of a block using the partially skip mode. Theinformation on the block type may correspond to skip_(—)16*16,skip_(—)1[beta]*8, skip_(—)8*16, or skip_P8*8 according to a block size,by which various examples are non-limited. And, it is able to transferpartially skip mode flag information (partially skip flag) indicatingwhether a related art skip mode or a partially skip mode of the presentinvention is used. The meaning of the flag information is represented asTable 8.

TABLE 8 Partially_skip_flag Meaning 0 Current block does not usepartially skip mode. (Related art skip mode is used.) 1 Current blockuses partially skip mode.

The inter prediction unit 250 of the decoding apparatus according to thepresent invention receives the block type information and the partiallyskip mode flag information. If the partially skip mode is used, theinter prediction unit 250 uses a motion vector of a block co-locatedwith a current block in a previous frame as a motion vector of thecurrent block. If so, the skip mode is further activated to raise codingefficiency. And, it is also able to raise a reconstruction rate of acurrent block using motion vectors more than those of the related artskip mode.

Meanwhile, it may be more efficient for a decoder to derive and useinformation relevant to a motion vector of its own instead of receivingany information relevant to the motion vector from an encoder. Thus, avideo signal decoding apparatus can use a direct mode for derivinginformation required for motion estimation of a current block. Thisdirect mode includes a spatial direct mode and a temporal direct mode.The spatial direct mode derives a motion vector of a current block and areference index from a neighbor block on a decoder. And, the temporaldirect mode is performed in the same manner of the related art picture-Bdirect mode. Unlike the temporal direct mode, the spatial direct mode isrestricted to derive and use a single motion vector by 16*16 block unitonly even if P8*8 block adopts the spatial direct mode.

Therefore, a ninth embodiment of the present invention proposes8*8-based spatial direct mode capable of using various motion vectors ina spatial direct mode.

FIG. 23A is a diagram for motion vectors of P8*8 blocks adopting aspatial direct mode according to a related art and FIG. 23B is a diagramfor motion vectors of 8*8 block according to a ninth embodiment of thepresent invention.

Referring to FIG. 23A, in a related art method, if a current block isP8*8 block and uses a direct mode, P8*8 blocks constructing 16*16 blockhave the same motion vector and reference index. Blocks A, B, C and D,as shown in FIG. 23A, derive to use the same motion vector (mv) andreference index through median filtering using block-a (located left tothe 16*16 block), block-b (located above the 16*16 block) and block-c(located at upper right side of the 16*16 block). Referring to FIG. 23B,8*8-based spatial direct mode of the present invention derives to usevarious motion vectors using neighbor blocks. In FIG. 23B, block-A′ usesa median of motion vectors of neighbor blocks block-a′, block-b′,block-c′ and block-d′ as a motion vector (mva′) of the block-A′.Block-B′ uses motion vectors of neighbor blocks block-a′, block-d′ andblock-e′ as a motion vector (mvb′). Block-C derives a motion vector(mvc′) using block-b′, block-c′ and block-d′. And, block-D′ derives amotion vector (mvd′) using block-b′, block-d′ and block-e′. In thiscase, as a reference index, a smallest value among reference indexes ofthe used neighbor blocks like the related art is selected to raisecoding efficiency.

Thus, the 8*8-based spatial direct mode uses at least two motion vectorswithin 16*16 block by calculating a motion vector for each P8*8 block.Therefore, it is advantageous in having a high reconstruction rate incase that a current block is located on a boundary area or a smallobject s moving.

A method of processing a video signal, which further includes a step ofrearranging video signals in a discrete cosine transform step, accordingto another embodiment of the present invention is explained withreference to FIG. 24 and FIG. 25 as follows. This method reduces a bitrate and an error from an original picture.

Referring to FIG. 24, in discrete cosine transform of the related art, avideo signal is transformed into 2-dimensional frequency component. And,a size of each base component included in a block of the transformedvideo signal is found. Quantization and zigzag scan are then performed.The video signal for this discrete cosine transform uses 2-dimensionaltransform scheme. In particular, transform is performed in a rowdirection. Another transform is then performed in a column direction.

Besides, it is able to more enhance a compression ratio by deriving ablock having a small coefficient to gather in DC component prior to thetransform in each direction. Therefore, a tenth embodiment of thepresent invention further includes the step of rearranging blocks priorto the transform in each direction by considering a residual andcoefficient of each block, thereby enhancing a compression ratio in amanner of enabling a discrete cosine transform coefficient to gathercloser around the DC component that that of general discrete cosinetransform. In the following description, a case that blocks forperforming rearrangement are residual signal is explained.

Referring to FIG. 25, discrete cosine rearrangement transform accordingto a tenth embodiment of the present invention includes a firstrearranging step and a second rearranging step prior to a row and columndirectional transforming step.

In the first rearranging step, a block having a small value is arrangedon a left side by comparing residuals of blocks in a row direction,first rearrangement information indicating the rearrangement order isgenerated, and discrete cosine transform is then performed in the rowdirection.

In the second rearranging step, the block having the small value isrearranged on an upper side in a column direction with reference to aresidual discrete-cosine-transformed in the row direction and secondrearrangement information indicating the rearrangement order is thengenerated. This embodiment of the present invention regards the methodof rearrangement by comparing the residuals of the respective blocks toeach other, by which various examples of the present invention arenon-limited.

As mentioned in the above description, if the discrete cosine transformis performed in a manner of rearranging residual signals to enable ablock having a small residual to be located at a left or upper side in arow or column, discrete cosine transform coefficients are distributed bygathering around the left side DC component). Therefore, it is able toobtain more enhanced compression effect.

Moreover, the encoding/decoding method of the present invention can beimplemented in a program to be executed in a computer and can berecorded in a computer-readable recording medium. And, multimedia datahaving a data structure according to the present invention can berecorded in a computer-readable recording medium. The computer-readablemedia include all kinds of recording devices in which data readable by acomputer system are stored. The computer-readable media include ROM,RAM, CD-ROM, magnetic tapes, floppy discs, optical data storage devices,and the like for example and also include carrier-wave typeimplementations (e.g., transmission via Internet). And, a bit streamproduced by the encoding method is stored in a computer-readablerecording medium or can be transmitted via wireline/wirelesscommunication network.

While the present invention has been described and illustrated hereinwith reference to the preferred embodiments thereof, it will be apparentto those skilled in the art that various modifications and variationscan be made therein without departing from the spirit and scope of theinvention. Thus, it is intended that the present invention covers themodifications and variations of this invention that come within thescope of the appended claims and their equivalents.

INDUSTRIAL APPLICABILITY

Accordingly, the present invention is applicable to audio encoding anddecoding.

The invention claimed is:
 1. A method of decoding a video signal with adecoding apparatus, comprising: determining, with the decodingapparatus, a motion vector candidate set of a current block, the motionvector candidate set including a plurality of motion vector candidates,the plurality of motion vector candidates including at least one of aspatial motion vector and a temporal motion vector; obtaining, with thedecoding apparatus, motion vector indication information of the currentblock from the video signal, the motion vector indication informationindicating a motion vector candidate used for inter prediction of thecurrent block among the plurality of motion vector candidates;extracting, with the decoding apparatus, the motion vector candidatecorresponding to the motion vector indication information from themotion vector candidate set; determining, with the decoding apparatus, apredicted motion vector of the current block based on the extractedmotion vector candidate; and performing, with the decoding apparatus,motion compensation on the current block based on the predicted motionvector, wherein the determining the motion vector candidate setcomprises: scaling, with the decoding apparatus, a motion vector of aneighboring block by considering a temporal distance between a currentpicture including the current block and a reference picture of thecurrent block; and setting, with the decoding apparatus, the scaledmotion vector to the spatial motion vector.
 2. The method of claim 1,wherein the temporal motion vector is a motion vector of a co-locatedblock with the current block in a frame other than the current pictureincluding the current block.